Adium

Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#13485 closed enhancement (fixed)

StatusNet configuration should allow the user of Adium to override the 140 character limit

Reported by: grahamperrin Owned by: kbotc
Milestone: Adium 1.5 Component: Service/StatusNet-Identi.ca
Version: 1.5hg Severity: normal
Keywords: StatusNet Cc:
Patch Status: Accepted

Description

http://brainbird.net/notice/892857 demonstrates that some StatusNet instances may vary from the (debatable) 140 character norm.

http://brainbird.net/conversation/892835#notice-892835 demonstrates truncation of a long message sent using Adium to that type of instance.

Suggestions

Each StatusNet configuration in Adium should allow the user to vary from the 140 character limit.

Also: if the user omits to set a variation, and if the user simply sends a notice longer than 140 characters, Adium should not truncate the message.

See also

http://status.net/trac/ticket/2037, OMB specification: server should declare its character limit

Attachments (4)

statusnet-limit-config.diff (4.2 KB) - added by brion 10 years ago.
Patch to query StatusNet config API for text limit at connect time (newly exposed in 0.9)
statusnet-limit-config-updated.diff (4.2 KB) - added by brion 10 years ago.
Updated patch, cleaned up for single return
statusnet-limit-config-fixed-warnings.diff (4.5 KB) - added by brion 9 years ago.
More code style tweaks per review in #adium-devl: clean up use of self->, use AILog instead of NSLog for config fetch error
statusnet-limit-config-non-blocking.patch (6.1 KB) - added by kbotc 8 years ago.

Download all attachments as: .zip

Change History (26)

comment:1 follow-up: Changed 10 years ago by zacw

  • Resolution set to worksforme
  • Status changed from new to closed

In the next beta the forced truncation is being removed.

comment:2 Changed 10 years ago by zacw

  • Resolution worksforme deleted
  • Status changed from closed to new

Oh I see, you want a preference for the limit. Hmmm. That would require some changes.

comment:3 Changed 10 years ago by zacw

  • Milestone set to Adium 1.4.x

comment:4 in reply to: ↑ 1 Changed 10 years ago by grahamperrin

Replying to zacw:

In the next beta the forced truncation is being removed.

Verified, thanks; http://brainbird.net/notice/922533 (and cross-post http://twitter.com/grahamperrin/status/6186575287).

preference for the limit. Hmmm. That would require some changes.

Maybe defer any changes in that area until after developers of StatusNet comment on http://status.net/trac/ticket/2037

Changed 10 years ago by brion

Patch to query StatusNet config API for text limit at connect time (newly exposed in 0.9)

comment:5 Changed 10 years ago by brion

The StatusNet configuration query API is adding the character limit in 0.9.x; attached patch above checks this at connection time and, if a limit is given, uses that instead of the 140 default.

If the setting changes on the server, it'll be reflected after the next disconnect/connect.

Example of the config API:
https://identi.ca/api/statusnet/config.xml

(Note that the 'textlimit' var may not yet be exposed on identi.ca as we haven't deployed the update as of this writing, but I've confirmed it picks up valued correctly from our StatusNet 0.9.x work branch and continues to use the defaults on older installations.)

comment:6 Changed 10 years ago by Robby

  • Patch Status set to Needs Dev Review

comment:7 Changed 10 years ago by Chaos_99

Hi, I'm using 1.4b17 here, which is 2 releases more recent than the version of the original poster.

If I'm understanding this "In the next beta the forced truncation is being removed." and this "Verified, thanks;" correctly, the enforcement should be gone in my revision.

I nevertheless get a char count while typing and a 'connection error' if I'm over 140 chars. Are there any further requirements on the server to allow larger messages for now? (Except of course the larger message size itself.)

Thanks

comment:8 Changed 10 years ago by kbotc

Does not match code style guidelines.

http://trac.adium.im/wiki/CodingStyle#Multiplereturnstatements

Fix it, and I'll put this as OK to apply.

Changed 10 years ago by brion

Updated patch, cleaned up for single return

comment:9 Changed 10 years ago by Robby

  • Milestone changed from Adium 1.4.x to Adium 1.4.1
  • Owner set to kbotc

comment:10 Changed 10 years ago by kbotc

Sorry to be so nit-picky, but for readability sake, go ahead and change the name of textLimit in the queryTextLimit method to something unique. It will become confusing during debugging as there is already an ivar of the same name. Also, in cocoa, when you're trying to reference an instance variable, you do not need to use the self-> arrow operator. Drop that as well, so that self->textlimit is just textlimit.

comment:11 Changed 9 years ago by Robby

  • Patch Status changed from Needs Dev Review to Needs Changes by Author

Changed 9 years ago by brion

More code style tweaks per review in #adium-devl: clean up use of self->, use AILog instead of NSLog for config fetch error

comment:12 Changed 9 years ago by Robby

  • Patch Status changed from Needs Changes by Author to Needs Dev Review

comment:13 follow-up: Changed 9 years ago by zacw

This needs to be non-blocking.

comment:14 Changed 9 years ago by Robby

  • Patch Status changed from Needs Dev Review to Needs Changes by Author

comment:15 Changed 9 years ago by evands

  • Milestone changed from Adium 1.4.1 to Adium 1.4.2

comment:16 Changed 9 years ago by Robby

  • Component changed from Adium Core to Service/StatusNet-Identi.ca
  • Milestone changed from Adium 1.4.2 to Adium 1.4.3

comment:17 Changed 8 years ago by evands

  • Milestone changed from Adium 1.4.3 to Good ideas for later

I'm moving this off a milestone until it's made non-blocking.

comment:18 Changed 8 years ago by paulwilde

  • Milestone changed from Good ideas for later to Patches Needing Improvement

Pushing to the new "Patches Needing Improvement" milestone.

comment:19 Changed 8 years ago by kbotc

  • Milestone changed from Patches Needing Improvement to Adium 1.5
  • Patch Status changed from Needs Changes by Author to OK; Needs Check-In
  • Version changed from 1.4b15 to 1.5hg

comment:20 in reply to: ↑ 13 Changed 8 years ago by Robby

  • Milestone changed from Adium 1.5 to Patches Needing Improvement
  • Patch Status changed from OK; Needs Check-In to Needs Changes by Author

kbotc,
Replying to zacw:

This needs to be non-blocking.

xnyphs just agreed:

20:46:19 xnyhps: -initWithContentsOfURL: is a big no-no. We have an asynchronous API for that.

Changed 8 years ago by kbotc

comment:21 Changed 8 years ago by Robert Vehse

  • Resolution set to fixed
  • Status changed from new to closed

(In f5b424ece00d) Patch from kbotc based on one by brion: allow overriding the 140 character limit for StatusNet. Fixes #13485.

comment:22 Changed 8 years ago by Robby

  • Milestone changed from Patches Needing Improvement to Adium 1.5
  • Patch Status changed from Needs Changes by Author to Accepted
Note: See TracTickets for help on using tickets.